﻿using System.Collections.Generic;
using ATM.Terminal.Models;

namespace ATM.Terminal.Database
{
    public static class DummyDatabase
    {
        private static List<AccountModel> _accounts; 

        public static List<AccountModel> Accounts
        {
            get { return _accounts ?? (_accounts = GenerateDummyData()); }
            set { _accounts = value; }
        }

        private static List<AccountModel> GenerateDummyData()
        {
            return new List<AccountModel>
                {
                    new AccountModel
                        {
                            AccountNumber = 1234,
                            AccountPIN = 1234,
                            FirstName = "Michael",
                            LastName = "Overhorst",
                            Balance = 12.50
                        },
                    new AccountModel
                        {
                            AccountNumber = 4321,
                            AccountPIN = 4321,
                            FirstName = "Jan",
                            LastName = "Janssen",
                            Balance = 25.00
                        }
                };
        }
    }
}
